<?php

namespace DP\Single;

class Single
{
    private static $instance = null;

    private function __construct()
    {
    }

    private function __clone()
    {
    }

    public static function getInstance()
    {
        if (!self::$instance) {
            self::$instance = new self();
        }

        return self::$instance;
    }

    public function welcome($name)
    {
        echo 'hello ' . $name;
    }
}
